﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using Dtf.Core;
using System.Windows.Automation;

namespace TestForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
            treeView1.Nodes.Add("t").Nodes.Add("") ;
        }

        WorkQueue wq = new WorkQueue();

        private void treeView1_BeforeExpand(object sender, TreeViewEventArgs e)
        {
            XItem x = new XItem(wq, treeView1);
            wq.Enqueue(x);

           
            //ThreadStart updateThread = delegate()
            //{
            //    foreach (UIItem i in UIItem.Root.Children)
            //    {

            //        treeView1.Nodes.Add(i.Name);
            //    }
                
            //};
            //updateThread();
            
        }
    }
}
